﻿#ifndef QQLAUNCH_H
#define QQLAUNCH_H

#include <QObject>
#include <QApplication>
#include <QScreen>

#include "qq.h"
#include "qqmain.h"
#include "communication.h"
#include "websocketclient.h"
#include "sqliteutil.h"
#include "trayiconmenu.h"


class QQLaunch : public QObject
{
    Q_OBJECT
public:
    explicit QQLaunch(QObject *parent = nullptr);
signals:
    void quit();
public slots:
    void login(const QString &wsAddr,const QString &email,const QString &username,const bool &isDownLoad,const QString &sign,const QString &token);
    void logout();
private:
    QQ* qq=nullptr;
    QQMain* qqmain=nullptr;
    Communication* communication=nullptr;
    QSystemTrayIcon *trayIcon=nullptr;
    TrayIconMenu* trayIconMenu=nullptr;
    void loadQQRespond();
    void loadQQMainRespond();
    void loadCommunicationRespond();
};

#endif // QQLAUNCH_H
